package com.ch.boundarycallbackdemo.db

import androidx.paging.DataSource
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.ch.boundarycallbackdemo.bean.Data

@Dao
interface NewsDao {

    @Insert
    fun insertNewsList(dataList: List<Data>);

    @Query("DELETE FROM data")
    fun clearData()

    @Query("SELECT * FROM data")
    fun getDataList(): DataSource.Factory<Int, Data>
}